﻿namespace Fetches.Fetch.Utils.IdGenerator
{
    /// <summary>
    /// 来自于Vesta,但是Fetches想尽量少部署外部服务器所以重写了
    /// </summary>
    public interface IIdService
    {
        /// <summary>
        /// 生成ID
        /// </summary>
        /// <returns></returns>
        long GenerateId();
        /// <summary>
        /// 解释ID
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Id ExplanId(long id);

        #region 手工生成ID用于测试
        long MakeId(long time, long seq);

        long MakeId(long time, long seq, long machine);

        long MakeId(long genMethod, long time, long seq, long machine);

        long MakeId(long type, long genMethod, long time,
            long seq, long machine);

        long MakeId(long version, long type, long genMethod,
            long time, long seq, long machine);
        #endregion
    }
}